home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Utilities Professional 1-1500
/
Utilities Professional 1-1500 (1994)(WPD)[!].iso
/
07511000
/
var0784.dms
/
var0784.adf
/
ArpUserDocs3.1
/
List
< prev
next >
Wrap
Text File
|
1978-01-24
|
10KB
|
331 lines
List(V1.3) ARP User's Manual List(V1.3)
NAME
List - List contents of a directory.
SYNOPSIS
List Dir P=PAT/k KEYS/s DATES/s NODATES/s SUB/k SINCE/k
SORT/s TO/k UPTO/k QUICK/s BLOCK=BLOCKS/s NOHEAD/s
FILES/s DIRS/s LFORMAT/k
DESCRIPTION
List displays the contents of a given directory. By
contents, we mean the names of the subordinate files and
directories, not the file data. Typing the List command by
itself with no parameters generates a listing of the current
directory.
THE LISTING DISPLAY
List displays your files and directories one per line, with
more information about each file displayed to the right of
the filename. The fields which may appear in a Listed file
are
name [KEY] size/type protection date time
:comment
Methods are provided for getting a selective listing of
files, as well as suppressing/adding most of the above
display elements. A description of each one of the above
elements is given below:
Name The name of the file or directory.
[KEY]
This is the actual block number of the file or
directory block header. This is not displayed by
default, you must use the KEYS switch to generate this
element of the listing.
size/type
This element gives the size of the file in bytes, or
the string "empty" if the file is empty. If this is a
directory and not a file, then the directory indicator
("Dir") will appear here.
protection
The protection bits of the current file, in the order
hsparwed. If any of these is disabled, a dash (-) will
appear in its place. The protection bits stand for
"hidden, script, pure, archived, read, write, execute
and delete", respectively.
date time
The date and time of the last modification to the file
Page 1 (printed 4/28/89)
List(V1.3) ARP User's Manual List(V1.3)
or directory. The format of the date display is
determined by the value of the environment variable
dateformat. These elements of the listing appear by
default, but may be selectively added or subtracted by
using the DATES or NODATES keywords.
comment
The comment as set by Filenote. If no comment exists,
this field will not be displayed. Note that it is
displayed on a line by itself, preceded by a colon.
SELECTIVE LISTING OF FILES
The methods described in this section allow you to list a
portion of the files and directories on your disks. Ways
exist to generate a list of files that conform to a certain
pattern, or that were created/modified before or after a
certain date. You may also combine these options, for
example, you may get a list of all files which end in .c and
were created or modified since a certain date. These options
are described below:
Dir List this directory instead of the current directory.
This parameter may be a filename, in which case the
single file is shown. You may also use any legal ARP
pattern in this position, in which case the files and
directories listed will be those which match the
pattern, if any. (This feature was added to the
BCPL List in the V1.3 enhancer.)
PAT List only files and directories which match the
pattern. You must specify the keyword PAT or its
abbreviation P. This is no longer truly necessary with
the expanded capabilities of the ARP List, since it is
usually more convenient to simply include the pattern
in the directory specification as described above. It
is included for BCPL compatibility.
SUB This searches for an occurence of the substring
anywhere within the directory name or filename. Think
of this as a short form of "List PAT *substring*" or a
long form of "List *substring*". List will reject any
attempts to combine the use of PAT and S. Wildcards in
the initial DIR argument are matched and then checked
again to match against the substring.
SINCE
While the pattern matching options above filter files
and directories on the basis of their names, this
option, and the following UPTO option, filter out files
based on their last modification date. SINCE displays
Page 2 (printed 4/28/89)
List(V1.3) ARP User's Manual List(V1.3)
only files which have been created or modified on or
later than the specified date. All older files are not
displayed. You may specify the date in the currently
defined dateformat (see Environment Variables) or you
may use a word such as SUNDAY, TODAY, YESTERDAY, etc.
UPTO The inverse of SINCE, this option displays only files
and directories which have been modified or
created on or before the specified date. Files younger
than this date are not displayed. See SINCE for a
description of the date format list expects.
FILES
Display only files.
DIRS Display only directories.
CONTROLLING THE DISPLAY
The options below allow you to alter the format of the
display listing, or to send it to another file or output
display device (that's usually a printer).
TO You can specify a file or a device you wish the listing
to be sent to using this keyword. If not specified,
the default of the current window will be used.
DATES
Forces date and time information to be displayed in the
current dateformat.
NODATES
Will not display time and date information, only the
filename, size, protection and comment fields will be
displayed.
QUICK
Displays only the filename field, one filename per
line, with no trailing spaces. You can combine this
with other options such as DATES and KEYS to
selectively enable these fields.
KEYS Displays the block number of each file header or
directory header.
SORT Sorts the file and directory names into ascending
alphabetical order. Case is disregarded. Note that
this is an option available only with the ARP list.
Sorts by DATE if you include the DATES keyword.
BLOCK=BLOCKS
Displays filesizes in blocks, rather than bytes.
NOHEAD
Page 3 (printed 4/28/89)
List(V1.3) ARP User's Manual List(V1.3)
Suppresses the default header and footer display.
LFORMAT
LFORMAT can be used to control the output of list, and
especially to generate command lines to be fed to the
shell. LFORMAT takes a string as an argument which can
be any ascii string. To include the output of List in
this string, you can use the "%S" sequence as follows:
"%S" Filename
"%S%S" Pathname/Filename
"%S%S%S" Pathname/FilenamePathname
"%S%S%S%S" Pathname/FilenamePathname/Filename
The %S's may be separated by spaces, other ascii text
or nothing, as above. Here is an example of LFORMAT
that will create a script to Type each file:
List LFORMAT="Type %S%S"
Of course, to use this, you must save it in a file
using TO or one of the IO Redirection operators ('>',
'>>'). If you are using Ash, the ARP Shell, you can
also pipe the output of List directly into its Builtin
Execute command. The Ash Manual has some examples of
using List with its LFORMAT option.
ENVIRONMENT VARIABLES
The ARP List uses the same dateformat variable as used by
the ARP Date command, and in essentially the same way. If
it is not defined, or if it has an illegal value, the
default AmigaDOS display and input is used. Otherwise, the
display and the input of dates is determined as follows:
0 AmigaDOS format DD-MMM-YY.
1 International format YY-MM-DD.
2 U.S. format MM-DD-YY.
3 Canada DD-MM-YY
If you prefix the above numbers with a dash, then the
display of names like TODAY, MONDAY, FUTURE, etc., will be
disabled and the format string as defined above will be used
exclusively. Note that this governs the format that List
expects as input as well as the format List uses for
display.
EXAMPLES
List df1:*.c SINCE WEDNESDAY
Page 4 (printed 4/28/89)
List(V1.3) ARP User's Manual List(V1.3)
Displays all files in df1: ending with the characters "*.c"
which were modified later than TUESDAY at 00:00 hours.
Page 5 (printed 4/28/89)